{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1417
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,ls,kk,j,qq:longint;
	s:string;
	ch:char;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
read(i,j);
ls:=i+j;
kk:=(i+j) div 2;
for qq:=i to kk do begin
	ch:=s[qq];
	s[qq]:=s[ls-qq];
	s[ls-qq]:=ch;
end;
write(s);
end.